<template>
	<view>
		<uni-nav-bar
		  fixed
		  title="党员报名列表"
		  status-bar
		  left-icon="left"
		  background-color="#2163e0"
		  color="#fff"
		  @clickLeft="back"
		/>
		<view class="build-content">
			<view class="content-header">
				<view class="title" v-for="(item, index) in Ranking" :key="index">
					{{ item.name }}
				</view>
			</view>
			<view v-if="hyRankList.length !== 0">
				<view
					class="content"
					v-for="(item, index) in hyRankList"
					:key="index"
					>
					<view class="content-item"> {{ item.partyMemberName }}</view>
					<view class="content-item">{{ item.partyMemberPhone }} </view>
					<view class="content-item"> {{ item.dynamicRegion }}</view>
				</view>
			</view>
			<view class="none" v-else>
				{{ "暂无数据" }}
			</view>
		</view>
	</view>
</template>

<script>
import api from "../../api/api";
export default {
	data() {
		return {
			Ranking: [
				{
					name: "姓名",
				},
				{
					name: "手机号",
				},
				{
					name: "单位",
				},
			],
			hyRankList: [],
		};
	},
	onLoad: function (option) {
		console.log(option.dynamicId)
		if(option.dynamicId){
			this.getPartyInfo(option.dynamicId)
		}
		
	},
	methods: {
		back() {
		  uni.navigateBack({
		    delta: 1,
		  });
		},
		getPartyInfo(dynamicId) {
			var data = {
				dynamicId: dynamicId,
			};
			api.getPartyInfo(data).then((e) => {
				console.log(e.data)
				if (e.data.code == 200) {
					this.hyRankList = e.data.result
					
				}
			});
		},
	},
	mounted() {
	},
};
</script>

<style lang="scss" scoped>
.header {
	height: 85px;
	width: 100vw;
	.home-content {
		height: 85px;
		width: 100vw;
		position: fixed;
		top: 0;
		text-align: center;
		color: #fff;
		font-weight: 700;
		.home-title {
			width: 100%;
			height: 50px;
			line-height: 50px;
			background-color: #2163e0;
		}
	}
	.home-item {
		width: 100vw;
		height: 50px;
		background-color: #f2f2f2;
		display: flex;
		justify-content: space-between;
		.home-items {
			position: relative;
			width: 50vw;
			height: 50px;
			line-height: 50px;
			font-weight: 700;
			color: #000;
			.up {
				position: absolute;
				display: inline-block;
				width: 0;
				height: 0;
				right: 20%;
				top: 30%;
				border-top: 10px solid transparent;
				border-right: 10px solid transparent;
				border-left: 10px solid transparent;
				border-bottom: 10px solid #797979;
				border-radius: 5px;
			}
			.down {
				position: absolute;
				display: inline-block;
				width: 0;
				height: 0;
				right: 20%;
				top: 45%;
				border-top: 10px solid #797979;
				border-right: 10px solid transparent;
				border-left: 10px solid transparent;
				border-bottom: 10px solid transparent;
				border-radius: 5px;
			}
		}
	}
}
.build-content{
	margin-top: 15px;
	.content-header{
		display: flex;
		justify-content: space-between;
		.title{
			width: 40%;
			text-align: center;
			margin-bottom: 10px;
			font-weight: 600;
		}
	}
	.content{
		width: 100vw;
		padding: 10px;
		margin-top: 5px;
		background-color: #F7F7F7;
		display: flex;
		justify-content: space-between;
		.content-item{
			width: 30%;
			text-align: center;
		}
	}
	.none{
		text-align: center;
		margin-top: 20px;
		font-weight: 700;
		font-size: 18px;
	}
}
</style>
